FROM golang:alpine

RUN mkdir /app
#相当于linux跑的cd
WORKDIR /app

COPY ./ ./

ENV GOPROXY=https://goproxy.cn,direct

RUN go build main.go

#FROM scratch
#
#WORKDIR /app
#
#COPY --from=builder /app/main /app/main
#COPY -- from=builder /app/config /app/config

CMD ["/app/main"]

